#----------------------------------------------------------
def get_gauss_quad_sphere(order):

    import numpy as np;
    assert(isinstance(order,int));
    assert(order>=1);
    assert(order<=6);

    numpts = 0;
    if order==1:
        numpts = 1;
    elif order==2:
        numpts = 3;
    elif order==3:
        numpts = 6;
    elif order==4:
        numpts = 12;
    elif order==5:
        numpts = 16;
    elif order==6:
        numpts = 25;

    assert(numpts>0);

    quad_pts  = np.zeros([numpts,2])
    quad_wgts = np.zeros(numpts)

    if order==1:
        quad_pts[0,0] = 0.0;
        quad_pts[0,1] = 0.0;

        quad_wgts[0]  = 0.5;

    elif order==2:
        quad_pts[0,0] =  1.0/3.0;
        quad_pts[0,1] = -1.0/6.0;

        quad_pts[1,0] = -1.0/6.0;
        quad_pts[1,1] = -1.0/6.0;

        quad_pts[2,0] = -1.0/6.0;
        quad_pts[2,1] =  1.0/3.0;

        quad_wgts[0]  = 1.0/6.0;
        quad_wgts[1]  = 1.0/6.0;
        quad_wgts[2]  = 1.0/6.0;

    elif order==3:

        quad_pts[0,0] =  0.112615157582632;
        quad_pts[0,1] =  0.112615157582632;

        quad_pts[1,0] = -0.225230315165263;
        quad_pts[1,1] =  0.112615157582632;

        quad_pts[2,0] =  0.112615157582632;
        quad_pts[2,1] = -0.225230315165263;

        quad_pts[3,0] = -0.241757119823562;
        quad_pts[3,1] = -0.241757119823562;

        quad_pts[4,0] =  0.483514239647126;
        quad_pts[4,1] = -0.241757119823562;

        quad_pts[5,0] = -0.241757119823562;
        quad_pts[5,1] =  0.483514239647126;

        quad_wgts[0]  = 0.1116907948390055;
        quad_wgts[1]  = 0.1116907948390055;
        quad_wgts[2]  = 0.1116907948390055;
        quad_wgts[3]  = 0.0549758718276610;
        quad_wgts[4]  = 0.0549758718276610;
        quad_wgts[5]  = 0.0549758718276610;

    elif order==4:

        quad_pts[0,0]  = -0.084046588162423;
        quad_pts[0,1]  = -0.084046588162423;

        quad_pts[1,0]  =  0.168093176324846;
        quad_pts[1,1]  = -0.084046588162423;

        quad_pts[2,0]  = -0.084046588162423;
        quad_pts[2,1]  =  0.168093176324846;

        quad_pts[3,0]  = -0.270244318841831;
        quad_pts[3,1]  = -0.270244318841831;

        quad_pts[4,0]  =  0.540488637683663;
        quad_pts[4,1]  = -0.270244318841831;

        quad_pts[5,0]  = -0.270244318841831;
        quad_pts[5,1]  =  0.540488637683663;

        quad_pts[6,0]  = -0.280188283488516;
        quad_pts[6,1]  = -0.022980882299549;

        quad_pts[7,0]  = -0.280188283488516;
        quad_pts[7,1]  =  0.303169165788066;

        quad_pts[8,0]  = -0.022980882299549;
        quad_pts[8,1]  =  0.303169165788067;

        quad_pts[9,0]  = -0.022980882299549;
        quad_pts[9,1]  = -0.280188283488516;

        quad_pts[10,0] =  0.303169165788066;
        quad_pts[10,1] = -0.022980882299549;

        quad_pts[11,0] =  0.303169165788066;
        quad_pts[11,1] = -0.280188283488516;

        quad_wgts[0]  = 0.0583931378631895;
        quad_wgts[1]  = 0.0583931378631895;
        quad_wgts[2]  = 0.0583931378631895;
        quad_wgts[3]  = 0.0254224531851035;
        quad_wgts[4]  = 0.0254224531851035;
        quad_wgts[5]  = 0.0254224531851035;
        quad_wgts[6]  = 0.0414255378091870;
        quad_wgts[7]  = 0.0414255378091870;
        quad_wgts[8]  = 0.0414255378091870;
        quad_wgts[9]  = 0.0414255378091870;
        quad_wgts[10] = 0.0414255378091870;
        quad_wgts[11] = 0.0414255378091870;

    elif order==5:

        quad_pts[0,0]  =  0.0;
        quad_pts[0,1]  =  0.0;

        quad_pts[1,0]  =  0.125959254959390;
        quad_pts[1,1]  =  0.125959254959390;

        quad_pts[2,0]  = -0.251918509918779;
        quad_pts[2,1]  =  0.125959254959390;

        quad_pts[3,0]  =  0.125959254959390;
        quad_pts[3,1]  = -0.251918509918779;

        quad_pts[4,0]  = -0.162764025581573;
        quad_pts[4,1]  = -0.162764025581573;

        quad_pts[5,0]  =  0.325528051163147;
        quad_pts[5,1]  = -0.162764025581573;

        quad_pts[6,0]  = -0.162764025581573;
        quad_pts[6,1]  =  0.325528051163147;

        quad_pts[7,0]  = -0.282786105016302;
        quad_pts[7,1]  = -0.282786105016302;

        quad_pts[8,0]  =  0.565572210032605;
        quad_pts[8,1]  = -0.282786105016302;

        quad_pts[9,0]  = -0.282786105016302;
        quad_pts[9,1]  =  0.565572210032605;

        quad_pts[10,0] = -0.324938555923375;
        quad_pts[10,1] = -0.070220503698695;

        quad_pts[11,0] = -0.324938555923375;
        quad_pts[11,1] =  0.395159059622071;

        quad_pts[12,0] = -0.070220503698695;
        quad_pts[12,1] = -0.324938555923375;

        quad_pts[13,0] = -0.070220503698695;
        quad_pts[13,1] =  0.395159059622071;

        quad_pts[14,0] =  0.395159059622071;
        quad_pts[14,1] = -0.324938555923375;

        quad_pts[15,0] =  0.395159059622071;
        quad_pts[15,1] = -0.070220503698695;

        quad_wgts[0]  = 0.0721578038388935;
        quad_wgts[1]  = 0.0475458171336425;
        quad_wgts[2]  = 0.0475458171336425;
        quad_wgts[3]  = 0.0475458171336425;
        quad_wgts[4]  = 0.0516086852673590;
        quad_wgts[5]  = 0.0516086852673590;
        quad_wgts[6]  = 0.0516086852673590;
        quad_wgts[7]  = 0.0162292488115990;
        quad_wgts[8]  = 0.0162292488115990;
        quad_wgts[9]  = 0.0162292488115990;
        quad_wgts[10] = 0.0136151570872175;
        quad_wgts[11] = 0.0136151570872175;
        quad_wgts[12] = 0.0136151570872175;
        quad_wgts[13] = 0.0136151570872175;
        quad_wgts[14] = 0.0136151570872175;
        quad_wgts[15] = 0.0136151570872175;

    elif order==6:

        quad_pts[0,0]  =  0.000000000000000;
        quad_pts[0,1]  =  0.000000000000000;

        quad_pts[1,0]  = -0.304488600100648;
        quad_pts[1,1]  =  0.152244300050324;

        quad_pts[2,0]  =  0.152244300050324;
        quad_pts[2,1]  = -0.304488600100648;

        quad_pts[3,0]  =  0.152244300050324;
        quad_pts[3,1]  =  0.152244300050324;

        quad_pts[4,0]  =  0.447703515696593;
        quad_pts[4,1]  = -0.223851757848296;

        quad_pts[5,0]  = -0.223851757848296;
        quad_pts[5,1]  =  0.447703515696593;

        quad_pts[6,0]  = -0.223851757848296;
        quad_pts[6,1]  = -0.223851757848296;

        quad_pts[7,0]  = -0.191626113918450;
        quad_pts[7,1]  = -0.025393494569212;

        quad_pts[8,0]  = -0.025393494569212;
        quad_pts[8,1]  = -0.191626113918450;

        quad_pts[9,0]  = -0.191626113918450;
        quad_pts[9,1]  =  0.217019608487667;

        quad_pts[10,0] =  0.217019608487667;
        quad_pts[10,1] = -0.191626113918450;

        quad_pts[11,0] = -0.025393494569212;
        quad_pts[11,1] =  0.217019608487666;

        quad_pts[12,0] =  0.217019608487666;
        quad_pts[12,1] = -0.025393494569212;

        quad_pts[13,0] = -0.308329798570647;
        quad_pts[13,1] = -0.086660772693430;

        quad_pts[14,0] = -0.086660772693430;
        quad_pts[14,1] = -0.308329798570647;

        quad_pts[15,0] = -0.308329798570647;
        quad_pts[15,1] =  0.394990571264078;

        quad_pts[16,0] =  0.394990571264078;
        quad_pts[16,1] = -0.308329798570647;

        quad_pts[17,0] = -0.086660772693430;
        quad_pts[17,1] =  0.394990571264078;

        quad_pts[18,0] =  0.394990571264078;
        quad_pts[18,1] = -0.086660772693430;

        quad_pts[19,0] = -0.323792517933034;
        quad_pts[19,1] = -0.266530082321133;

        quad_pts[20,0] = -0.266530082321133;
        quad_pts[20,1] = -0.323792517933034;

        quad_pts[21,0] = -0.323792517933034;
        quad_pts[21,1] =  0.590322600254167;

        quad_pts[22,0] =  0.590322600254167;
        quad_pts[22,1] = -0.323792517933034;

        quad_pts[23,0] = -0.266530082321133;
        quad_pts[23,1] =  0.590322600254167;

        quad_pts[24,0] =  0.590322600254167;
        quad_pts[24,1] = -0.266530082321133;

        quad_wgts[0]  =  0.0454089951913770;
        quad_wgts[1]  =  0.0183629788782335;
        quad_wgts[2]  =  0.0183629788782335;
        quad_wgts[3]  =  0.0183629788782335;
        quad_wgts[4]  =  0.0226605297177640;
        quad_wgts[5]  =  0.0226605297177640;
        quad_wgts[6]  =  0.0226605297177640;
        quad_wgts[7]  =  0.0363789584227100;
        quad_wgts[8]  =  0.0363789584227100;
        quad_wgts[9]  =  0.0363789584227100;
        quad_wgts[10] =  0.0363789584227100;
        quad_wgts[11] =  0.0363789584227100;
        quad_wgts[12] =  0.0363789584227100;
        quad_wgts[13] =  0.0141636212655285;
        quad_wgts[14] =  0.0141636212655285;
        quad_wgts[15] =  0.0141636212655285;
        quad_wgts[16] =  0.0141636212655285;
        quad_wgts[17] =  0.0141636212655285;
        quad_wgts[18] =  0.0141636212655285;
        quad_wgts[19] =  0.0047108334818665;
        quad_wgts[20] =  0.0047108334818665;
        quad_wgts[21] =  0.0047108334818665;
        quad_wgts[22] =  0.0047108334818665;
        quad_wgts[23] =  0.0047108334818665;
        quad_wgts[24] =  0.0047108334818665;

    return quad_pts,quad_wgts,numpts
#----------------------------------------------------------
